<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5" type="home">
{
  style: {
    navigationStyle: 'custom',
    navigationBarTitleText: '首页',
  },
}
</route>
<template>
  <!-- <view
    class="bg-white overflow-hidden pt-2 px-4"
    :style="{ marginTop: safeAreaInsets?.top + 'px' }"
  > -->
  <view class="content">
    <view class="top-bg" />
    <SummaryCard class="top-summary"></SummaryCard>
  </view>
  <!-- </view> -->
</template>

<script lang="ts" setup>
import PLATFORM from '@/utils/platform'
import SummaryCard from './components/summary-card.vue'

defineOptions({
  name: 'Home',
})

// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()
// 测试 uni API 自动引入
onLoad(() => {})
</script>

<style>
.main-title-color {
  color: #d14328;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.top-bg {
  width: 100%;
  height: 40vh;
  background-color: darkcyan;
  border-radius: 0 0 24rpx 24rpx;
}

.top-summary {
  margin-top: -50rpx;
}
</style>
